<?php
 
 /*
	The content is retrieved in arrays by content types:
	
	$content['news']
	$content['features']
	$content['reviews']
	$content['blogs']
	$content['gallery']
	$content['show']
	
	all enabled content is retrieved by the controller
 
 */
 
 //Unhash to print content array
 
 #print_r($content['news']);
 #print_r($content['features']);
 #print_r($content['reviews']);
 #print_r($content['blogs']);
 #print_r($content['gallery']);
 #print_r($content['show']); 
 #print_r($featured_images);
 #print_r($content);
?>
<!---container--->
<body>
<div id="fixed-nav" class="row-fluid">
	<!---logo---> 
		  <div class="row-fluid">   
			<div id="logo">
				<a href="#home">
                    <img src="<?php echo base_url();?>assets/themes/digradio/images/communities_dig-u359.png" class="logo" />                               </a>
			</div>
		</div> 
	<!---nav--->
<div id="main-nav" class="navbar main-form">
				<div class="navbar-inner">
						<div class="nav-collapse collapse">
							<div class="menu">
								<ul class="nav">
                                    <li id="trigger">
                                    <a href="#" ><img src="<?php echo base_url().'assets/themes/digradio/images/menu.png';?>" />
                                        <div id="sub-navigation">
                                            <div style="padding-top:10px;" class="sub-nav">
                                                <a href="<?php echo base_url(); ?>">Pinoytuner</a>
                                                <a href="<?php echo base_url(); ?>planetjazz">DreamFM /Planetjazz</a>
                                                <a href="<?php echo base_url(); ?>riceradio">Riceradio</a>
                                                <a href="<?php echo base_url(); ?>yoradio">Yoradio</a>
                                                <hr />
                                                <?php if(isset($logged_in) && $logged_in !='' ): ?>
                                                    <p>Welcome <?php echo $user['strUsername']; ?></p>
                                                    <a href="<?php echo base_url() ?>users/logout">Logout</a>
                                                <?php else: ?>
                                                    <a href="<?php echo base_url() ?>login">Login</a>
                                                    <a href="<?php echo base_url() ?>users/signup">Register</a>
                                                <?php endif; ?>
                                            </div>
                                        </div>  
                                    </a>
                                    </li> 
                                    </ul>
                                <ul class="nav pull-right">
									<li class="alfa"><a href="#articles" class="scroll-to">articles</a></li>
                                    <?php if(!empty($content['show'])): ?>
									<li class="alfa"><a href="#shows" class="scroll-to">shows</a></li>
									<?php endif; ?>
                                    <?php if(!empty($content['events'])): ?>
                                    <li class="alfa"><a href="#events" class="scroll-to">events</a></li>
                                    <?php endif; ?>
                                    <?php if(!empty($content['gallery'])): ?>
									<li class="alfa"><a href="#gallery" class="scroll-to">gallery</a></li>
                                    <?php endif; ?>
									<li id="search" class="search-bar">	
											<input type="text" placeholder="search" id="search-input">
                                            <div style="margin-top: -9px;
width: 25px;" href="#" id="search-button" class="btn"><i class="icon-search"></i></div>
									</li>
								</ul>
							</div>
						</div>
				</div>
			</div>
    </div>
<div id="container">
<div class="page-container">
<div class="main-form" style="position:relative;">
	<div id="home">&nbsp;</div>
	<!---endfixed--->
	<!---featured box--->
	<div id="featuredbox" class="row-fluid">
		<div class="span12">
				<div id="featuredCarousel" class="carousel slide">
					<div class="clear"></div>
						<div class="carousel-inner">
							<?php 
								$ctr = 1;
								foreach($featured_images as $image ):
							?>
								<div class="item <?php echo ($ctr==1)?'active':''; ?>">
									<div class="featured_carousel">
										<a href="<?php echo base_url().'digradio/content/'.get_type_name($image['contentType']).'/'.$image['intID'].'/'.simplify_title($image['strTitle']); ?>" >
											<img class= "carousel-img" src="<?php echo IMAGE_UPLOAD_DIR.$image['strPicture']; ?>"/>
											<div class="carousel-caption">
												<h3 class="alfa caption">
													<?php
												    echo $image['strTitle']; 
                                                    ?>
												</h3>
                                                <?php
                                                if($image['enumShowPlayerLink'] == 'yes'):
                                                    ?>
                                                    <br />
                                                <a target="" class="btn btn-inverse" href="#"  onclick = "window.open('<?php echo base_url().'player/load_player/'.$community->strName;  ?>','Player','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=600,left='+(screen.availWidth/2-350)+',top='+(screen.availHeight/2-250)+'');return false;" >
						Play Me
					</a>
                                                <a class="btn btn-inverse" href="<?php echo base_url().'digradio/content/'.get_type_name($image['contentType']).'/'.$image['intID'].'/'.simplify_title($image['strTitle']); ?>" >
											
                                                    Read Me
                                                </a>
                                                
                                                    
                                                    <?php endif; ?>
											</div>
										</a>
									</div>
								</div>
							<?php $ctr++; endforeach;?>
						</div>
						<?php if(count($featured_images) > 1): ?>
							  <a class="carousel-control left" href="#featuredCarousel" data-slide="prev">
									<img src="<?php echo base_url().'assets/themes/digradio/images/arrows white_left.png';?>" />	
								</a>
							  <a class="carousel-control right" href="#featuredCarousel" data-slide="next">
									<img src="<?php echo base_url().'assets/themes/digradio/images/arrows white_right.png';?>" />
							  </a>
						<?php endif; ?>
				</div>
			<div class="clear"> </div>
		</div>
	</div>
	<!---endfeatured--->
	<!---socialmedia&banner--->
	<div id="icon-list" class="row-fluid grid-960">
        <?php if(isset($video)): ?>
        <div class="alert alert-success" style="font-family:'Arial','sans-serif'">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
                <?php echo $video->strTitle; ?> is now Streaming. Press the play button to watch!
        </div>
        <div class="clear"></div>
        <?php endif; ?>
		<div style="float:left;">
			<ul id="social-media-list">	
				<li>
					<a target=""  href="#"  onclick = "window.open('<?php echo base_url().'player/load_player/'.$community->strName;  ?>','Player','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=600,left='+(screen.availWidth/2-350)+',top='+(screen.availHeight/2-250)+'');return false;" >
						<img src="<?php echo base_url().'assets/themes/digradio/images/dig-social_playme.png';?>" id="ply" />
					</a>
				</li>
				<?php if($community->strFacebookPage != ""): ?>
				<li>
					<a target="_blank" href="<?php echo $community->strFacebookPage; ?>">
						<img src="<?php echo base_url().'assets/themes/digradio/images/social_facebook.png';?>" class="soc" />
					</a>
				</li>
					<?php endif; ?>
					<?php if($community->strTwitterPage != ""): ?>
				<li>
					<a target="_blank" href="<?php echo $community->strTwitterPage; ?>">
						<img src="<?php echo base_url().'assets/themes/digradio/images/social_twitter.png';?>" class="soc" />
					</a>
				</li>
					<?php endif; ?>
					<?php if($community->strGoogleplusPage != ""): ?>
				<li>
					<a target="_blank" href="<?php echo $community->strGoogleplusPage; ?>" >
						<img src="<?php echo base_url().'assets/themes/digradio/images/social_gplus.png';?>" class="soc" />
					</a>
				</li>
					<?php endif; ?>
					<?php //echo $ptmenu; ?>
				<div class="clear"> </div>
			</ul>
			<div class="clear"> </div>
		 </div>
		 <div class="ads" style="float:right;width:720px;">
			<iframe id="banner-top" src="<?php echo base_url().'digradio/ads/dig-home';?>"></iframe>
		 </div>
	</div>
	<!---endsocialmedia &banner--->
	<!---articles--->
	<div id="articles"></div>
	<div id="article" class="row-fluid grid-960">
	<!---tabs--->
 		<ul class="nav nav-tabs" id="myTab">
			<li id="news" class="active alfa"><a href="#news-tab" rel="#news-sub" class="select-atype">News</a></li>			
			<li id="features" class="alfa"><a href="#features-tab" rel="#features-sub" class="select-atype">Features</a></li>			
			<li id="reviews" class="alfa"><a href="#reviews-tab" rel="#reviews-sub" class="select-atype">Reviews</a></li>			
		</ul>
	<!------------------- ARTICLES CONTENT ------------------>
		<div class="row-fluid tab-content" style="background:#fff;">
	<!------------------------ NEWS ----------------------------->
			<div class="tab-pane active" id="news-tab">
				<?php if(empty($content['news'])): ?>
					<img src="<?php echo base_url();?>assets/themes/digradio/images/placeholder.jpg" />
					<?php else: //foreach($content['news'] as $item):?>
						<div class="row-fluid content-item">								
							<div class="item-image">
								 <img class="image" src="<?php echo IMAGE_UPLOAD_DIR.'medium/'.$content['news'][0]['strPicture']; ?>"/>
							</div>
							<div class="item-text">
								<h3>
									<a class="alfa" href="<?php echo base_url().'digradio/content/'.get_type_name($content['news'][0]['fk-tb_mas_content_types']).'/'.$content['news'][0]['intID'].'/'.simplify_title($content['news'][0]['strTitle']); ?>" >
										<?php echo $content['news'][0]['strTitle']; ?>
									</a>										
								</h3>
								<p><span class="article-date">
									<?php
										$date = date('M d, Y', strtotime($content['news'][0]['dteStart']));
										echo $date;
									?>
									</span>
								</p>
								<p>
									<?php echo $content['news'][0]['strSecondary']; ?>
								</p>
								<p>
									<a class="read-more" href="<?php echo base_url().'digradio/content/'.get_type_name($content['news'][0]['fk-tb_mas_content_types']).'/'.$content['news'][0]['intID'].'/'.simplify_title($content['news'][0]['strTitle']); ?>"> Read more </a>
								</p>
                                <div class="clear"></div>
                                <!---------------DIV head for Add this with custom values---->
                                <div class="addthis_toolbox addthis_default_style addthis_32x32_style"
                                    addthis:url="<?php echo base_url().'digradio/content/'.get_type_name($content['news'][0]['fk-tb_mas_content_types']).'/'.$content['news'][0]['intID'].'/'.simplify_title($content['news'][0]['strTitle']); ?>"
                                    addthis:title="<?php echo $content['news'][0]['strTitle']; ?>"
                                    addthis:description="<?php echo strip_tags($content['news'][0]['strSecondary']); ?>">                                                              
								<!-------END DIV HEAD---------->
									<a class="addthis_button_facebook_like" fb:like:layout="box_count"></a>
									<a class="addthis_button_tweet" tw:count="vertical"></a>
									<a class="addthis_button_google_plusone" g:plusone:size="tall"></a>
									<a class="addthis_counter"></a>			
								</div>
                                
								<div class="archive-button">
									<h3>
										<a class=" archive-link" href="<?php echo base_url().'digradio/archive/'.get_type_name($content['news'][0]['fk-tb_mas_content_types']) ?>"> more news </a>
									</h3>
								</div>
									<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
									<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4ec0214313fd07b4"></script>
							</div>	
						</div>
					<?php //endforeach; ?>
					<div class="clear"></div>
				<?php endif; ?>
			</div>
			<?php if($content['news_count']>4): ?>
			<!-------------------------------------ARTICLE AJAX TRACKER--------------------------------------------------->
				<input type="hidden" value="1" id="news-current">
			<!------------------------------------------------------------------------------------------------------------>	
			<?php endif; ?>
	<!-------------------------- FEATURES ---------------------->
			<div class="tab-pane" id="features-tab">
				<?php if(empty($content['features'])): ?>
					<img src="<?php echo base_url();?>assets/themes/digradio/images/placeholder.jpg" />	
				<?php else: //foreach($content['features'] as $item):?>
					<div class="row-fluid content-item">								
						<div class="item-image">
							<img class="image" src="<?php echo IMAGE_UPLOAD_DIR.'medium/'.$content['features'][0]['strPicture']; ?>"/>
						</div>
						<div class="item-text">
							<h3>
								<a class="" href="<?php echo base_url().'digradio/content/'.get_type_name($content['features'][0]['fk-tb_mas_content_types']).'/'.$content['features'][0]['intID'].'/'.simplify_title($content['features'][0]['strTitle']); ?>" >
									<?php echo $content['features'][0]['strTitle']; ?>
								</a>
							</h3>
							<p>
								<span class="article-date">
									<?php
										$date = date('M d, Y', strtotime($content['features'][0]['dteStart']));
										echo $date;
									?>
								</span>
							</p>
							<p>
								<?php echo $content['features'][0]['strSecondary']; ?>
							</p>
							<p>
								<a class=" read-more" href="<?php echo base_url().'digradio/content/'.get_type_name($content['features'][0]['fk-tb_mas_content_types']).'/'.$content['features'][0]['intID'].'/'.simplify_title($content['features'][0]['strTitle']); ?>"> Read more </a>
							</p>
                            <div class="clear"></div>
							<!---------------DIV head for Add this with custom values---->
                                <div class="addthis_toolbox addthis_default_style addthis_32x32_style"
                                    addthis:url="<?php echo base_url().'digradio/content/'.get_type_name($content['features'][0]['fk-tb_mas_content_types']).'/'.$content['features'][0]['intID'].'/'.simplify_title($content['features'][0]['strTitle']); ?>"
                                    addthis:title="<?php echo $content['features'][0]['strTitle']; ?>"
                                    addthis:description="<?php echo strip_tags($content['features'][0]['strSecondary']); ?>">                                                               
							<!-------END DIV HEAD---------->
									<a class="addthis_button_facebook_like" fb:like:layout="box_count"></a>
									<a class="addthis_button_tweet" tw:count="vertical"></a>
									<a class="addthis_button_google_plusone" g:plusone:size="tall"></a>
									<a class="addthis_counter"></a>			
								</div>
								<div class="archive-button">
									<h3><a class=" archive-link" href="<?php echo base_url().'digradio/archive/'.get_type_name($content['features'][0]['fk-tb_mas_content_types']) ?>"> more features </a></h3>
								</div>
								<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
								<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4ec0214313fd07b4"></script>
							</div>	
							<div class="clear"></div>	
						</div>					
						<?php //endforeach; ?>
					<div class="clear"></div>
				<?php endif; ?>	
			</div>			
			<?php if($content['features_count']>4): ?>			
			<!-------------------------------------ARTICLE AJAX TRACKER--------------------------------------------------->
				<input type="hidden" value="1" id="features-current">
			<?php endif; ?>	
	<!--------------------------- REVIEWS ------------------------>
			<div class="tab-pane" id="reviews-tab">
				<?php if(empty($content['reviews'])): ?>
					<img src="<?php echo base_url();?>assets/themes/digradio/images/placeholder.jpg" />
				<?php else: //foreach($content['reviews'] as $item):?>
					<div class="row-fluid content-item">			
						<div class="item-image">
							<img class="image" src="<?php echo IMAGE_UPLOAD_DIR.'medium/'.$content['reviews'] [0]['strPicture']; ?>"/>
						</div>
						<div class="item-text">
							<h3>
								<a class="" href="<?php echo base_url().'digradio/content/'.get_type_name($content['reviews'] [0]['fk-tb_mas_content_types']).'/'.$content['reviews'][0]['intID'].'/'.simplify_title($content['reviews'] [0]['strTitle']); ?>" >
									<?php echo $content['reviews'] [0]['strTitle']; ?>
								</a>
							</h3>
							<p>
								<span class="article-date">
									<?php
										$date = date('M d, Y', strtotime($content['reviews'][0]['dteStart']));
										echo $date;
									?>
								</span>
							</p>
							<p>
								<?php echo $content['reviews'][0]['strSecondary']; ?>
							</p>
							<p>
								<a class=" read-more" href="<?php echo base_url().'digradio/content/'.get_type_name($content['reviews'][0]['fk-tb_mas_content_types']).'/'.$content['reviews'][0]['intID'].'/'.simplify_title($content['reviews'][0]['strTitle']); ?>">Read more</a>
							</p>
                            <div class="clear"></div>
							<!---------------DIV head for Add this with custom values---->
                                <div class="addthis_toolbox addthis_default_style addthis_32x32_style"
                                    addthis:url="<?php echo base_url().'digradio/content/'.get_type_name($content['reviews'][0]['fk-tb_mas_content_types']).'/'.$content['reviews'][0]['intID'].'/'.simplify_title($content['reviews'][0]['strTitle']); ?>"
                                    addthis:title="<?php echo $content['reviews'][0]['strTitle']; ?>"
                                    addthis:description="<?php echo strip_tags($content['reviews'][0]['strSecondary']); ?>">                                                               
							<!-------END DIV HEAD---------->
									<a class="addthis_button_facebook_like" fb:like:layout="box_count"></a>
									<a class="addthis_button_tweet" tw:count="vertical"></a>
									<a class="addthis_button_google_plusone" g:plusone:size="tall"></a>
									<a class="addthis_counter"></a>			
								</div>
							<div class="archive-button">
								<h3><a class=" archive-link" href="<?php echo base_url().'digradio/archive/'.get_type_name($content['reviews'][0]['fk-tb_mas_content_types']) ?>"> more reviews </a></h3>
							</div>
							<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
							<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4ec0214313fd07b4"></script>
						</div>	
						<div class="clear"></div>	
					</div>
					<div class="clear"></div>
					<?php //endforeach; ?>
					<?php endif; ?>	
				</div>			
				<?php /* if($content['reviews_count']>4): ?>
					<!-------------------------------------ARTICLE AJAX TRACKER--------------------------------------------------->
					<input type="hidden" value="1" id="reviews-current">
					<li id="reviews-sub" class="sub-menu pager">
						<hr class="clear" />
						<a href="#" class="switch-button sb-left pull-left" rel="left-reviews">&lsaquo; Prev</a>
						<span id="reviews-pager" class="page-indicator">1 to <?php echo ($content['reviews_count']>4)?'4':$content['reviews_count'];  ?> of <?php echo $content['reviews_count'];  ?> reviews</span>
						<a href="#" class="switch-button sb-right pull-right" rel="right-reviews">Next &rsaquo; </a>						
						<div class="clear"></div>
					</li>
				<?php endif;*/ ?>
		</div>
	</div>
	<!---endarticle--->
	<div class="row-fluid grid-960">
		<div class="ads-content">
			<iframe class="banner-content" src="<?php echo base_url().'digradio/ads/dig-articles';?>"></iframe>
		</div>
	</div>
	<!---shows--->
    <?php if(!empty($content['show'])): ?>
	<div id="shows"></div>
	<div id="show" class="row-fluid grid-960">

		<div class="line">&nbsp;</div>
			<p class="cap">shows</p>
		<div class="line2">&nbsp;</div>
		<div id="show-slide" class="carousel slide grid-960" style="background:#fff;"> 
		<div class="clear"></div> 
				<div class="carousel-inner grid-960"> 
		<?php for($index = 0; $index < count($content['show']); $index++): ?> 
			<div id="show-item" class="item <?php echo ($index == 0)?'active':''; ?>"> 
				<ul id="show-slide" class="thumbnails"> 
					<li class="show-item"> 
                        <div class="show-image-container">
						<a class="" href="<?php echo base_url().'digradio/content/'.get_type_name($content['show'][$index]['fk-tb_mas_content_types']).'/'.$content['show'][$index]['intID'].'/'.simplify_title($content['show'][$index]['strTitle']); ?>"> 
							<img src="<?php echo IMAGE_UPLOAD_DIR. $content['show'][$index]['strPicture'];?>"/> 
						</a> 
                        </div>    
                         <p class="show-description">
                            <?php echo $content['show'][$index++]['strSecondary']; ?>
                        </p>
					</li> 
					<?php if( $index < count($content['show'])):?> 
						<li class="show-item"> 
							<div class="show-sideborder"> 
                                <div class="show-image-container">
								<a class="" href="<?php echo base_url().'digradio/content/'.get_type_name($content['show'][$index]['fk-tb_mas_content_types']).'/'.$content['show'][$index]['intID'].'/'.simplify_title($content['show'][$index]['strTitle']); ?>"> 	
									<img src="<?php echo IMAGE_UPLOAD_DIR. $content['show'][$index]['strPicture'];?>"/> 
								</a>
                                </div>
                                 <p class="show-description">
                                    <?php echo $content['show'][$index++]['strSecondary']; ?>
                                </p>
							</div> 
						</li> 
					<?php endif; ?> 
					<?php if( $index < count($content['show'])):?> 
						<li class="show-item">
                            <div class="show-image-container">
							<a class="" href="<?php echo base_url().'digradio/content/'.get_type_name($content['show'][$index]['fk-tb_mas_content_types']).'/'.$content['show'][$index]['intID'].'/'.simplify_title($content['show'][$index]['strTitle']); ?>"> 
								<img src="<?php echo IMAGE_UPLOAD_DIR. $content['show'][$index]['strPicture'];?>"/> 
							</a> 
                            </div>
                            <p class="show-description">
                            <?php echo $content['show'][$index]['strSecondary']; ?>
                            </p>
						</li> 
					<?php endif; ?> 
				</ul> 
			</div> 
		<?php endfor; ?> </div>
		<?php if(count($content['show']) > 3): ?> 
			<a class="carousel-control left" href="#show-slide" data-slide="prev">
				<img src="<?php echo base_url().'assets/themes/digradio/images/arrows white_left_small.png';?>" />
			</a> 
			<a class="carousel-control right" href="#show-slide" data-slide="next">
				<img src="<?php echo base_url().'assets/themes/digradio/images/arrows white_right_small.png';?>" /></a> 
		<?php endif; ?>		
		</div>
		<div class="clear"> </div>
		<div class="row-fluid grid-960">
			<div class="ads-content" style="margin:20px auto 60px auto;">
				<iframe class="banner-content" src="<?php echo base_url().'digradio/ads/dig-shows';?>"></iframe>
			</div>
		</div>
		<div class="clear"> </div>
	</div>
    <?php endif; ?>
	<!---endshow--->
	<!---events--->
    <?php if(!empty($content['events'])): ?>
	<div id="events"></div>
	<div id="event" class="row-fluid grid-960">
		<div class="line"></div><p class="cap">events</p><div class="line2"></div>
			<div id="eventCarousel" class="carousel slide grid-960">
				<div class="clear"></div>
				<div class="carousel-inner">
					<?php for($index = 0; $index < count($content['event']); $index++): ?>
					<div id="events-item" class="item <?php echo ($index == 0)?'active':''; ?>">
						<ul id="eventSlide" class="thumbnails">
							<li class="span3 event_item">
								<a class="" href="<?php echo base_url().'digradio/content/'.get_type_name($content['event'][$index]['fk-tb_mas_content_types']).'/'.$content['event'][$index]['intID'].'/'.simplify_title($content['event'][$index]['strTitle']); ?>"> 
									<img class="events-img" src="<?php echo $content['event'][$index++]['strEventPosterUrl'];?>"/>
								</a>
							</li>
							<?php if( $index < count($content['event'])):?>
							<li class="span3 event_item">
								<a class="" href="<?php echo base_url().'digradio/content/'.get_type_name($content['event'][$index]['fk-tb_mas_content_types']).'/'.$content['event'][$index]['intID'].'/'.simplify_title($content['event'][$index]['strTitle']); ?>"> 
									<img  class="events-img" src="<?php echo $content['event'][$index++]['strEventPosterUrl'];?>"/>
								</a>
							</li>
							<?php endif; ?>
							<?php if( $index < count($content['event'])):?>
								<li class="span3 event_item">
									<a class="" href="<?php echo base_url().'digradio/content/'.get_type_name($content['event'][$index]['fk-tb_mas_content_types']).'/'.$content['event'][$index]['intID'].'/'.simplify_title($content['event'][$index]['strTitle']); ?>"> 
										<img  class="events-img" src="<?php echo $content['event'][$index++]['strEventPosterUrl'];?>"/>
									</a>
								</li>
							<?php endif; ?>
							<?php if( $index < count($content['event'])):?>
								<li class="span3 event_item">
									<a class="" href="<?php echo base_url().'digradio/content/'.get_type_name($content['event'][$index]['fk-tb_mas_content_types']).'/'.$content['event'][$index]['intID'].'/'.simplify_title($content['event'][0]['strTitle']); ?>"> 
										
										<img  class="events-img" src="<?php echo $content['event'][$index]['strEventPosterUrl'];?>"/>
									</a>
								</li>
							<?php endif; ?>
						</ul>
					</div>
					<?php endfor; ?>
				</div>
					<?php if(count($content['event']) > 4): ?>
							  <a class="carousel-control left" href="#eventCarousel" data-slide="prev">
								<img src="<?php echo base_url().'assets/themes/digradio/images/arrows white_left_small.png';?>" />
							  </a>
							  <a class="carousel-control right" href="#eventCarousel" data-slide="next">
								<img src="<?php echo base_url().'assets/themes/digradio/images/arrows white_right_small.png';?>" />
							</a>
					<?php endif; ?>
			</div>
	</div>
	<div class="row-fluid grid-960">
		<div id="events-ads" class="ads-content" style="margin:40px auto 40px auto;">
			<iframe class="banner-content" src="<?php echo base_url().'digradio/ads/dig-events';?>"></iframe>
		</div>
	</div>
	<div class="clear"> </div>
    <?php endif; ?>
	<!---end events--->
    <!-----GALLERY---------->
    <?php if(!empty($content['gallery'])): ?>
	<div id="gallery"></div>
	<div id="galleries" class="row-fluid grid-960">
		<div class="line"></div>
			<p class="cap">gallery</p>
		<div class="line2"></div>
        <div class="clear"></div>
		<div class="gallery-container">
			<?php if(empty($content['gallery'])): ?>
				<h3>No Gallery</h3>		
				<div id="gallery-content">
					<?php else: 
						foreach($content['gallery'] as $item):
					?>
					<div class="gallery-item" >
						<a class="" href="<?php echo base_url().'digradio/content/'.get_type_name($item['fk-tb_mas_content_types']).'/'.$item['intID'].'/'.simplify_title($item['strTitle']); ?>" >
							<img class="gallery-img" src="<?php echo IMAGE_UPLOAD_DIR.'gallery/'.$item['strPicture']; ?>"/>
							<h3 class="gallery-img-caption">
								<?php
									echo $item['strTitle']; ?>
							</h3>
						</a>
					</div>
					<?php endforeach; ?>
                    <div class="clear"></div>
				</div>
			<?php endif; ?>	
		</div>
			<div class="clear"> </div>
	</div>			
		<?php if($content['gallery_count']>8): ?>			
		<!-------------------------------------ARTICLE AJAX TRACKER--------------------------------------------------->
		<input type="hidden" value="1" id="gallery-current">
		<!------------------------------------------------------------------------------------------------------------>
		<?php endif; ?>
<!---------------------------------------------->
		<div class="clear"> </div>
	<div class="row-fluid grid-960">
		<div id="events-ads" class="ads-content"  style="margin:40px auto 40px auto;">
			<iframe class="banner-content" src="<?php echo base_url().'digradio/ads/dig-galleries';?>"></iframe>
		</div>
	</div>
      </div>
    <?php endif; ?>
<!----------FOOTER---------------------------------------------------------------------------------------------->	
	<div id="footer">
		<div id="logo-footer">
			<a href="#"><img src="<?php echo base_url();?>assets/themes/digradio/images/communities_dig-u359.png" class="diglogo-footer"/></a>
		</div>
		
		<div class="footer-item">
			<ul class="list-footer">
				<li class="p-footer"><a href="#articles" class="scroll-to">articles</a></li>
				<li class="p-footer"><a href="#shows" class="scroll-to">shows</a></li>
				<li class="p-footer"><a href="#events" class="scroll-to">events</a></li>
				<li class="p-footer"><a href="#gallery" class="scroll-to">gallery</a></li>
			</ul>
		</div>

		<div id="ptlogo-footer">
			<a href="<?php echo base_url(); ?>"><img src="<?php echo base_url();?>assets/themes/digradio/images/pt-big-logo-emb-white.png" /></a>
		</div>
	
		<div id = "radio-list" class="footer-item">
			<ul class="list-footer">
				<li class="p-footer"><a href="<?php echo base_url() ?>planetjazz" >DreamFM&nbsp;/&nbsp;Planetjazz</a></li>
				<li class="p-footer"><a href="<?php echo base_url() ?>riceradio" >Rice Radio</a></li>
				<li class="p-footer"><a href="<?php echo base_url() ?>yoradio" >Yo Radio</a></li>
			</ul>
		</div>
		<div id = "socialmedia-footer" class="footer-item">
			<ul class="list-footer">
                <li class="list-header-connect">CONNECT</li>
                <?php if($community->strFacebookPage != ""): ?>
				<li class="p-footer"><a target="_blank" href="<?php echo $community->strFacebookPage; ?>" >facebook</a></li>
                <?php endif; ?>
                <?php if($community->strTwitterPage != ""): ?>
				<li class="p-footer"><a target="_blank" href="<?php echo $community->strTwitterPage; ?>" >twitter</a></li>
                <?php endif; ?>
                <?php if($community->strGoogleplusPage != ""): ?>
				<li class="p-footer"><a target="_blank" href="<?php echo $community->strGoogleplusPage; ?>" >google plus</a></li>
                <?php endif; ?>
			</ul>
		</div>
		
		<div id = "pt-links" class="footer-item last">
			<ul class="list-footer">
                <li class="list-header-links">LINKS</li>
				<li class="p-footer"><a href="http://www.youtube.com/pinoytuner" >Pinoytuner Youtube Channel</a></li>
				<li class="p-footer"><a href="<?php base_url(); ?>" >Pinoytuner</a></li>
			</ul>
		</div>
        <div class="clear"></div>
	</div>
</div>

		</div><!-- /container -->
<!----------END FOOTER---------------------------------------------------------------------------------------------->
<!-- Modal -->
<div id="full-width" class="modal container hide fade modal1" tabindex="-1">

</div>
</body>
    